[libspirv] refactor generic atomic builtin to use CLC functions#21017
[libspirv] refactor generic atomic builtin to use CLC functions#21017uditagarwal97 merged 3 commits intointel:syclfrom
Conversation
Previous implementation uses outdated function e.g. __sync_val_compare_and_swap.
againull
left a comment
There was a problem hiding this comment.
sycl/test-e2e/WorkGroupMemory/reduction_lambda.cpp change lgtm.
bader
left a comment
There was a problem hiding this comment.
Add new __spirv_AtomicFlagClear and __spirv_AtomicFlagTestAndSet builtins. Add more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc.
Test WorkGroupMemory/reduction_lambda.cpp now passes on native-cpu device.
This part seems to be unrelated to the refactoring. Let's open a separate PR with this change.
Removed “Adding more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc is an automatic outcome of the refactor, so separating it into its own PR isn’t practical. The test WorkGroupMemory/reduction_lambda.cpp now unexpectedly passes with this PR, causing a CI failure. I'd like to keep the change so CI is green. |
|
@intel/llvm-gatekeepers please merge, thanks |
Previous implementation uses outdated function e.g. __sync_val_compare_and_swap.
This automatically addd more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc.
Test WorkGroupMemory/reduction_lambda.cpp now passes on native-cpu device.